package engine.parsers.impl;


import com.sun.syndication.feed.synd.SyndEnclosure;
import com.sun.syndication.feed.synd.SyndEntry;

import engine.content.IContent;
import engine.content.RSSContent;
import engine.parsers.IParser;
import engine.services.IContentService;



public final class FSParser implements IParser{


	@Override
	public IContent parse(IContent content, IContentService contentService) throws Exception {
		RSSContent rss = (RSSContent)content;
		SyndEntry entry = rss.getFeedIterator().next();
		
		SyndEnclosure enc = (SyndEnclosure)entry.getEnclosures().get(0);
		String FSGif = enc.getUrl();

		return contentService.getResponse(FSGif);
	}
}